home *** CD-ROM | disk | FTP | other *** search
/ The Original Shareware 1.1 / The Original Shareware (WeMake CDs)(Volume 1.1)(CDs, Inc)(1993).iso / 14 / ltsapp.zip / COMDOC.TXT next >
Text File  |  1986-10-26  |  16KB  |  311 lines

  1.                COMMA.APP  --  File Import COMMA-Delimited 
  2.  
  3. COMMA.APP is a Symphony (TM) Add-In application that augments Symphony's
  4. standard File Import  capabilities.  It adds  the option "Comma"  to the
  5. normal choices of "Text" and "Structured" on the File Import menu. 
  6.  
  7. COMMA imports structured ASCII files  onto a Symphony worksheet.  It has
  8. the same general functions as File-Import-Structured.  However, COMMA is
  9. often more  directly applicable  to importing  data records  than F-I-S,
  10. because of the following features: 
  11.  
  12.      1. Input files can have lines longer than 240 characters. 
  13.  
  14.      2. Commas which separate input fields are significant.  In
  15.         F-I-Structured, two or three commas between fields is
  16.         treated exactly the same as a single comma, but COMMA
  17.         obeys multiple commas as an indication to skip cells on
  18.         the worksheet.  This makes COMMA suitable for importing
  19.         data from many BASIC or disk filing programs. 
  20.  
  21.      3. Unlike F-I-Structured, text does not have to be quoted
  22.         for COMMA to import it as label cells onto the worksheet. 
  23.  
  24.      4. Input text can contain imbedded double-quote marks. 
  25.  
  26.      5. Label cells can be right-aligned or centered if desired. 
  27.  
  28.      6. Formulas can be entered, just as if they were typed in
  29.         SHEET mode.  In fact, COMMA can import any legal cell
  30.         contents; repeating labels, DOC format lines, etc. 
  31.  
  32.      7. Cells can be formatted as they are being input. 
  33.  
  34.      8. Column widths can be set appropriately for the input data. 
  35.  
  36.      9. Cells can be entered in an order other than strict
  37.         left-to-right and top-to-bottom. 
  38.  
  39. To make  the facilities of the  COMMA Add-In available to  Symphony, use
  40. the Application Attach  command to attach COMMA.APP at  the beginning of
  41. the session.  When COMMA is no  longer needed, Application Detach can be
  42. used  to remove  it from  Symphony's memory  area.  However,  it may  be
  43. convenient to keep COMMA attached while its functions are still needed. 
  44.  
  45. After COMMA.APP  is attached to Symphony,  it can be activated  from the
  46. File Import menu by selecting  [SERVICES] File Import Wide.  You will be
  47. instructed to identify a file to  be read, and then directed to indicate
  48. a target range for the import operation.  The default file extension for
  49. the input file is presumed to be PRN, but the standard Symphony filename
  50. specification procedures can be used to identify a file in any directory
  51. and with any desired extension. 
  52.  
  53. The target import range can be specified by pointing with an anchored or
  54. unanchored cursor, by typing a cell address or pair of cell coordinates,
  55. or by providing a range name.  If the target is specified as an anchored
  56. range, i.e. with upper-left and lower-right coordinates, then the import
  57. operation will be constrained to that range; no cells outside that range
  58. will be affected.   If an unanchored range is specified,  i.e. by giving
  59. the upper-left cell address only, then  cells to the right and below the
  60. target address may  be replaced by data from the  input file.  If global
  61. protection is enabled, however, then  any attempt to overwrite protected
  62. cells will immediately terminate the import operation. 
  63.  
  64. COMMA will  read files with  any desired  record length.  The  data from
  65. each  record  (line)  is  placed  in a  separate  row  on  the  Symphony
  66. worksheet.  Each record is terminated by  an ASCII Carriage Return (CR =
  67. 0Dh) and an optional Line Feed (LF = 0Ah) character.  End of file can be
  68. indicated either by an ASCII End-Of-File (EOF = 1Ah) character or by DOS
  69. knowing exactly how many bytes long the file is. 
  70.  
  71. Each line of the input file  can contain many fields.  These fields have
  72. either cell  data (text, numbers,  or formulas) or else  contain special
  73. instructions to COMMA which control the import process.  Each data field
  74. in a  record is placed in  a separate column on  the Symphony worksheet,
  75. unless a control  command in the input stream directs  COMMA to move the
  76. logical cursor to  another column or row.  Fields in  the input file are
  77. separated by commas.   Any number of blank spaces before  or after field
  78. values are ignored. 
  79.  
  80. Data fields can be constructed as follows: 
  81.  
  82.      1. Text is optionally enclosed in matching double-quote (")
  83.         characters.  A text string must be quoted if it needs to
  84.         contain an imbedded comma or leading or trailing blanks. 
  85.  
  86.         A text field can be up to 240 characters long between the
  87.         quotes or commas which delimit it.  Each text field is
  88.         placed into a Symphony cell as a left-aligned label.  If
  89.         a double-quote mark is needed as an imbedded character in
  90.         a quoted text string, it should be indicated by a pair of
  91.         double-quotes (""); unquoted text (which is delimited
  92.         only by commas) can contain a double-quote character
  93.         without any special preparation.  Any tab characters
  94.         (ASCII 09h) in the text will be expanded to blank spaces
  95.         with tab settings assumed at every eight (8) positions. 
  96.  
  97.      2. Numbers are entered without any delimiter characters.  A
  98.         numeric field consists of a string of digits, with an
  99.         optional leading dollar sign, an optional plus or minus
  100.         sign, an optional imbedded decimal point, and optionally
  101.         trailed by either a percent sign or an exponent.  The
  102.         standard Symphony rules for typing numbers into SHEET
  103.         cells are applied. 
  104.  
  105.      3. Formulas are enclosed in matching square bracket ( [ ] )
  106.         characters.  A formula field can be up to 240 characters
  107.         long between the brackets, and two right-brackets ( ]] )
  108.         can signify a required one in the formula string. 
  109.  
  110.         Each formula field is placed into a cell exactly as if it
  111.         were typed into a Symphony SHEET cell.  Imported formulas
  112.         can refer to range names and cell addresses as usual.
  113.         All references to cells by cell coordinates (A1, B2, ...)
  114.         are treated as references relative to the upper-left
  115.         corner of the target import range.  If the contents of a
  116.         bracketed string are not acceptable to Symphony as a
  117.         formula (or a label cell or number cell) then the formula
  118.         string is imported as a label cell prefaced by the string
  119.         ERR> and left on the worksheet for subsequent editing. 
  120.  
  121.         Note that brackets can be used to import label cells with
  122.         leading left- (') right- (") or center-alignment (^)
  123.         prefix characters.  This allows more specific control
  124.         over cell alignment than importing quoted text strings,
  125.         which are always loaded as left-aligned labels.  Also,
  126.         formula brackets can be used to import repeating labels
  127.         (with the \ prefix character) and special (prefixed by
  128.         the | character) label cells. 
  129.  
  130.      4. If any input field is longer than 240 characters, then it
  131.         is truncated at the 240-th character position without any
  132.         warning message.  If the final delimiter for the text (")
  133.         or formula (]) field is not found before the end of the
  134.         input line, then the entire field is ignored and the
  135.         corresponding cell on the worksheet is not filled. 
  136.  
  137. In addition to the data values  that COMMA can import, there are special
  138. command fields  that can be used  to control the import  process.  These
  139. fields are enclosed in curly brace ( { } ) characters.  They provide the
  140. ability to specify the cell format of imported fields, to set the column
  141. width of columns in the import range, and to import the fields in orders
  142. other than strict row-per-line and column-per-field sequence. 
  143.  
  144. If an unknown  command type is found between curly  braces, or the input
  145. line ends (CR) before the right-brace (}) character is found to complete
  146. the command, then the command string is ignored in the input stream.  In
  147. particular, note that an unquoted  string which begins with a left-brace
  148. -- but is not  intended to be used as a command --  may have its opening
  149. character(s) stripped by COMMA, which  would mistake the unquoted string
  150. for a special control command. 
  151.  
  152. The  following control  strings are  accepted, and  must be  enclosed in
  153. curly braces: 
  154.  
  155.         COMMAND  STRING    PURPOSE
  156.         -------  --------  ----------------------------------------
  157.         Home     H         Resets the import cursor to point to the
  158.                            upper-left corner of the import range.
  159.  
  160.         Right    R         Moves the import cursor one (or more)
  161.                  R ddd     cells to the right, skipping over any
  162.                            data already on the sheet.
  163.  
  164.         Left     L         Moves the import cursor one (or more)
  165.                  L ddd     cells to the left, skipping over any
  166.                            data already on the sheet.
  167.  
  168.         Down     D         Moves the import cursor one (or more)
  169.                  D dddd    rows down, skipping over any data
  170.                            already on the sheet.
  171.  
  172.         Up       U         Moves the import cursor one (or more)
  173.                  U dddd    rows up, skipping over any data already
  174.                            on the sheet.
  175.  
  176.         Width    W ddd     Sets the column width on the SHEET of
  177.                            the column targeted for the next field.
  178.  
  179.         Format   F fdd A   Sets the cell display format for cells
  180.                            imported after this command field.
  181.  
  182.  
  183. In the above list  the notation dd, ddd, or dddd stands  for a string of
  184. up to 2, 3,  or 4 decimal digits used in the  command.  Any blank spaces
  185. between the command identifying letter and the parameters of the command
  186. are optional.  Command  letters may be in either upper  or lower case (H
  187. or h, R or r, ...) but  must immediately follow the left curly brace ({)
  188. character which begins the command field. 
  189.  
  190. The following are examples of valid command fields: 
  191.  
  192.         {H}      Moves the import cursor to the beginning of the
  193.                  range for the File Import COMMA operation.
  194.  
  195.         {R}      Skips the cursor one cell to the right.
  196.  
  197.         {L 12}   Moves 12 cloumns to the left.
  198.  
  199.         {D123 }  Moves 123 rows down, skipping lines.
  200.  
  201.         {U 8193} Moves the cursor to the top line of the import
  202.                  range (see note below about large numbers).
  203.  
  204.         {W 15}   Sets the column width to 15 characters.
  205.  
  206. As  indicated in  the  above example  of the  Up  command, COMMA  limits
  207. actions of the special commands to reasonable numbers.  A Left operation
  208. can not back up to a column  before the selected import range, and an Up
  209. can not move above  the top import line.  A value  greater than 8192 for
  210. the Down command is treated as a move to row 8192, and a value above 256
  211. for the  Right command  is treated  as a  move to  column 256,  but such
  212. locations are subject  to being cut off because they  are likely outside
  213. of the import range initially specified.  Similarly, a column Width more
  214. than 240 will be ignored by Symphony. 
  215.  
  216. Aside from direct cursor movements ordered  by the commands, they do not
  217. affect the current  import cursor position.  A command does  not have to
  218. be followed  by a  comma, so  the cell pointer  will not  necessarily be
  219. updated by  the existence  of a  command in the  input stream.   This is
  220. especially useful so  that the Width command and the  Format command can
  221. be  included with  the data  that they  modify, in  which case  no comma
  222. should be placed between the command's closing right-brace character and
  223. the beginning of the data field value. 
  224.  
  225. The Format command field affects all  data cells imported until the next
  226. Format command.  The initial cell display format is Reset (with Prevent-
  227. Changes for protected  cells).  The Format command  uses specifiers like
  228. those shown  in the Symphony control  panel for SHEET cells:  e.g. C2 is
  229. Currency with 2 decimal places, T1 is a Time format, F0A indicates Fixed
  230. with zero decimals and Allow-Changes when global protection is on, etc. 
  231.  
  232. The following Format types are recognized: 
  233.  
  234.         CODE     EXAMPLE   Symphony FORMAT
  235.         -------  --------  ----------------------------------------
  236.         F0..15    1234.56  Fixed, with 0-15 decimal places
  237.         S0..15   1.23E+03  Scientific, with 0-15 decimal places
  238.         C0..15    $123.45  Currency, with 0-15 decimal places
  239.         P0..15   1,234.56  Punctuated, with 0-15 decimal places
  240.         %0..15     12.34%  Percent (%), with 0-15 decimal places
  241.         G         1234.56  General, like Fixed or Scientific
  242.         D1..5      05-Sep  Date, in 5 Symphony formats
  243.         T1..4    10:36 AM  Time, in 4 Symphony formats
  244.         B        ++++      Bar-Graph (+), horizontal graph
  245.         L        +A1-B2    Literal, formula text displayed
  246.         H                  Hidden, no cell value displayed
  247.         R        1234.563  Reset, cell display in default format
  248.  
  249. The Format command begins with a left-brace and an F (or f), and then it
  250. contains one  of the format  type specifiers and an  optional protection
  251. override flag.  Spaces can be used to separate the format type -- one or
  252. two  characters  --  from  the  F command  letter  for  clarity,  but  a
  253. two-character type specifier (e.g. C2) can not have imbedded spaces. 
  254.  
  255. In order to set the Allow-Changes flag for a cell, the Format command is
  256. specified with an "A" at the end of the format code (optionally preceded
  257. by spaces for clarity).  If the "A" is not given, the default protection
  258. status (Prevent-Changes) is incorporated into the cell format. 
  259. The following are examples of Format commands: 
  260.  
  261.         {F F2}   Fixed, with 2 decimal places.
  262.         {FS07 }  Scientific, 7 decimal places
  263.         {F C0 A} Currency, no decimals, Allow-Changes
  264.         {FP12}   Punctuated, with 12 decimal places
  265.         {F %0}   Percent, no decimal places
  266.         {FG}     General format
  267.         {F D1 }  Date format 1 (DD-MMM-YY)
  268.         {FT2}    Time format 2 (HH:MM:SS AM/PM)
  269.         {F BA }  Bar-Graph, Allow-Changes
  270.         {F L }   Literal, formula text instead of value
  271.         {FH}     Hidden, no cell value displayed
  272.         {F R}    Reset, back to default cell format
  273.         {FRA}    Reset, but with Allow_changes flag
  274.  
  275. All of the format  codes may be specified in either  upper case or lower
  276. case alphabetic characters.  If an unknown format code is specified, the
  277. Format command  is ignored.  If  no Format command  is given, or  if the
  278. Reset  code  is specified,  then  subsequent  imported cells  adopt  the
  279. default  format of  the  Symphony SHEET  window  currently active.   The
  280. Format command does not affect the default format status of Symphony. 
  281.  
  282. The following example illustrates several of the features of File Import
  283. COMMA.  If the ASCII file shown is imported to a range beginning at E21,
  284. the Symphony SHEET window will appear as indicated. 
  285.  
  286.                                   INPUT 
  287. (In this representation of the ASCII import file, CRLF indicates the end
  288. of an input line, i.e.  Carriage-Return Line-Feed, and EOF indicates the
  289. End-Of-File mark.) 
  290.  
  291. {W18}Region, {W12} ["Income], ["Expense]{w 12} , {W12 }["Profit]CRLF
  292. [\-],,,[\-],{F p2}    CRLF
  293. West Coast, 12345.67, 11e3, [+b3-c3]CRLF
  294. """Newest"" States" ,,50000,[+b4-c4]      CRLF
  295. "East Coast" {r} 98765, 12345%, [+B5-C5] CRLF
  296. CRLF
  297. [^TOTAL]{r 3}{f C2}[@sum(D3..d5)] EOF
  298.  
  299.                                  OUTPUT
  300.  
  301.    |-------------E--------------F-----------G-----------H---------I----|
  302.    21   Region                 Income     Expense      Profit          |
  303.    22   ------------------                        ------------         |
  304.    23   West Coast          12,345.67   11,000.00    1,345.67          |
  305.    24   "Newest" States                 50,000.00  (50,000.00)         |
  306.    25   East Coast          98,765.00      123.45   98,641.55          |
  307.    26                                                                  |
  308.    27         TOTAL                                $49,987.22          |
  309.    28                                                                  |
  310.    |===================================================================|
  311.